/*
 * Image.java  0.4.0 / Oct 24, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.swing.graphics;

/**
 * Abstract Image.
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public abstract class Image {

// Public Static Fields. -------------------------------------------------------

  /**
   * Fast image scaling (the value is {@value}).
   */
  public static final int SCALE_FAST = 2;

  /**
   * Smooth image scaling (the value is {@value}).
   */
  public static final int SCALE_SMOOTH = 4;

//Protected Constructors. -----------------------------------------------------

  /**
   * Constructs new Graphics object.
   */
  protected Image() {
    // empty constructor body
  }

// Public Abstract Methods. ----------------------------------------------------

  /**
   * Returns width of the image.
   *
   * @return width of the image
   */
  public abstract int getWidth();

  /**
   * Returns height of the image.
   *
   * @return height of the image
   */
  public abstract int getHeight();

  /**
   * Returns image producer.
   *
   * @return image producer
   */
  public abstract ImageProducer getSource();

  /**
   * Returns scaled image.
   *
   * @param width the width
   * @param height the height
   * @param hints the hints
   *
   * @return scaled image
   */
  public abstract Image getScaledInstance(int width, int height, int hints);

  /**
   * Flushes the resources.
   */
  public abstract void flush();

}
